home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 September / 1984-09.d64 / learn count_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  62 lines

  1. 28 poke788,52:poke53281,0:poke53280,0:s=54272
  2. 30 print"[147]"tab(11)"learning to count"
  3. 35 forl=stos+24:pokel,o:next:pokes+5,14:pokes+9,240:pokes+24,15:hf=s+1:lf=s
  4. 40 z=1024:c=0:col=s:dl(1)=10:dl(2)=25:dl(3)=35:dl(4)=50
  5. 50 fori=0to39:reada:readb:pokez+i,a:pokez+i+col,b:gosub5000:fort=1to75:next
  6. 52 ifb=5thenrestore
  7. 53 next
  8. 54 fori=0to39:reada:readb:pokez+960+i,a:pokez+960+i+col,b:gosub5000
  9. 55 fort=1to75:next:ifb=5thenrestore
  10. 56 next
  11. 57 fori=0to24:reada:readb:pokez+40*i,a:pokez+40*i+col,b:gosub5000
  12. 58 fort=1to75:next:ifb=5thenrestore
  13. 59 next
  14. 60 fori=0to24:reada:readb:pokez+39+40*i,a:pokez+39+40*i+coll,b:gosub5000
  15. 61 fort=1to75:next:ifb=5thenrestore
  16. 62 next:fort=1to2500:next
  17. 70 printchr$(147):print"    learning to count[146] can help you"
  18. 72 print"    learn to count up to 50."
  19. 73 print"    enter 1[146], 2[146], 3[146], or 4[146]."
  20. 75 print"     up to 10---1[146]":print"     up to 25---2[146]"
  21. 76 print"     up to 35---3[146]":print"     up to 50---4[146][145][145][145]";
  22. 80 inputd$:d=val(d$):ifd<1ord>4then70
  23. 100 r=0:w=0:n=0:x=dl(d):print"[147]"
  24. 206 a=(int(x*rnd(1)))*2:ifa/2+1=1then206
  25. 210 n=n+1:restore:scr=1304
  26. 220 forh=0toastep2:c=0
  27. 225 readl:m=int(rnd(0)*15)+1
  28. 226 ifl=5thenrestore
  29. 230 pokescr+h,l:pokescr+col+h,m:fort=1to75:next:gosub5000:fort=1to350:next
  30. 232 ifh=39thenscr=scr+80
  31. 238 next
  32. 239 print"          enter 0[146] to start over.":poke198,0
  33. 240 print"                ";:input"  how many";y$
  34. 245 ify$="0"thenn=n-1:goto3000
  35. 250 y=val(y$)
  36. 260 ify=h/2thengosub2000:r=r+1:printchr$(147):goto206
  37. 270 c=c+1:ifc=3thengoto2500
  38. 280 print"sorry! try again.":fort=1to1700:next:gosub4000:goto240
  39. 2000 print"[147]"tab(6)"    [209][209][209][209][209]        [209][209][209][209][209] "
  40. 2001 printtab(6)"   [209]     [209]      [209]     [209]"
  41. 2002 printtab(6)"     [166][166][166]          [166][166][166]  "
  42. 2003 printtab(6)"     [166][166][166]          [166][166][166] "
  43. 2004 printtab(6)"           [166][166][166][166]        "
  44. 2005 printtab(6)"[159]  [166]        [166][166][166][166]        [159][166]"
  45. 2006 printtab(6)"  [166]                    [166]"
  46. 2007 printtab(6)"   [166]                  [166] "
  47. 2008 printtab(6)"    [166]                [166]  "
  48. 2009 printtab(6)"     [166]              [166]   "
  49. 2010 printtab(6)"      [166]            [166]    "
  50. 2011 printtab(6)"       [166][166][166][166][166][166][166][166][166][166][166][166]     "
  51. 2020 gosub5010:return
  52. 2500 print"[147]"tab(16)"wrong![146]"
  53. 2510 print""tab(9)"there were";h/2;"[157] objects[146]"
  54. 2520 fort=1to800:next:fort=1to3500:next:printchr$(147):w=w+1:goto206
  55. 3000 print"[147]"tab(10)"you had:";n;"trys":print""tab(18);r;"right"
  56. 3010 print""tab(18);w;"wrong":fort=1to4000:next:restore:goto50
  57. 4000 print"                    ";:return
  58. 5000 pokes+4,17:pokehf,int(rnd(0)*50)+80:pokelf,250:pokes+4,16:return
  59. 5010 pokes+4,17:form=70to116step2:pokehf,m:pokelf,int(m/2):fordl=1to40:next
  60. 5020 next:pokes+4,16:return
  61. 9000 data81,1,65,2,83,3,90,4,88,5,90,6,102,7,42,1,35,2,36,3,38,4,1,5
  62.